

est clear

gen post_dem = post1 if W == 0
gen post_nondem = post1 if W == 1

global model school4 instrument post1 treat2_10_inc post_nondem post_dem

label var post1 "Post"
label var treat2_10_inc "Intensity"
label var post_nondem "Treated population (HE = 1)"
label var post_dem "Treated population (HE = 0)"

estpost summ $model if birthyear >= 1970 & birthyear <= 1997

esttab using "tables/summ_model.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber


* Econ

global econ_vars economic_index employed assets basic_necessities no_food no_water no_healthcare no_fuel no_income owns_radio owns_tv owns_vehicle

label var economic_index "Economic index"
label var employed "Employed"
label var assets "Assets"
label var basic_necessities "Basic necessities"
label var no_food "No food"
label var no_water "No water"
label var no_healthcare "No healthcare"
label var no_fuel "No fuel"
label var no_income "No income"
label var owns_radio "Owns radio"
label var owns_tv "Owns TV"
label var owns_vehicle "Owns vehicle"

estpost summ $econ_vars if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_econ_vars.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber


* Interest

global interest_vars information interest_pub_affairs_index discuss_pol_index news_scale radio tv newspaper

label var information "Interest index"
label var interest_pub_affairs_index "Interest in public affairs"
label var discuss_pol_index "Discuss politics"
label var news_scale "News index"
label var radio "News from radio"
label var tv "News from TV"
label var newspaper "News from newspaper"

estpost summ $interest_vars if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_interest_vars.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber


* Participation

global participation_vars participation_index participate_index contact_index vote1 raise_issue_index contact_officials_index contact_LG_councilor_index contact_MP_index

label var participation_index "Participation index"
label var participate_index "Participate index"
label var contact_index "Contact index"
label var vote1 "Voted in last election"
label var raise_issue_index "Raise issue"
label var contact_officials_index "Contact officials"
label var contact_LG_councilor_index "Contact LG councilor"
label var contact_MP_index "Contact MP"


estpost summ $participation_vars if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_participation_vars.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber


* Democracy

global democracy_vars dem_gov dem_support dem_checks_on_pres dem_institutions ///
	trust_courts trust_EC careful_say free_to_speak_mind free_to_join_pol_org free_vote_choice how_democratic satisfaction_democracy ///
	rej_oneman_rule_index term_limits_index against_pres_discretion_index opp_parties_crit_index checks_balances_index ///
	media_accountability_index against_oneparty_rule_index rej_mil_rule_index elec_choice_index newspaper_free_index against_gov_ban_org_index supports_democracy

label var dem_gov "Democratic quality index"
label var dem_support "Democratic support index"
label var dem_checks_on_pres "Checks on president"
label var dem_institutions "Democratic institutions index"
label var trust_courts "Trust courts"
label var trust_EC "Trust election commission"
label var careful_say "Careful to say"
label var free_to_speak_mind "Free to speak mind"
label var free_to_join_pol_org "Free to join political organization"
label var free_vote_choice "Free vote choice"
label var how_democratic "How democratic is Senegal"
label var satisfaction_democracy "Satisfied with Senegal's democracy"
label var rej_oneman_rule_index "Reject one man rule"
label var term_limits_index "Term limits"
label var against_pres_discretion_index "Against presidential discretion"
label var opp_parties_crit_index "Opposition criticizes"
label var checks_balances_index "Checks and balances"
label var media_accountability_index "Media accountability"
label var against_oneparty_rule_index "Against one party rule"
label var rej_mil_rule_index "Reject military rule"
label var elec_choice_index "Free choice of leaders through elections"
label var newspaper_free_index "Freedom of media"
label var against_gov_ban_org_index "Against government ban of organizations"
label var supports_democracy "Supports democracy"

estpost summ $democracy_vars if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_democracy_vars.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber


* Corruption and performance

global governance_vars corruption performance_index corruption_president corruption_government_officials corruption_MP corruption_LG_councilors handles_economy handles_employment handles_inflation handles_inequality handles_health handles_education handles_water loc_gov_handles_roads loc_gov_handles_clean loc_gov_handles_markets loc_gov_handles_health loc_gov_handles_fees

label var corruption "Corruption index"
label var performance_index "Government performance index"

estpost summ $governance_vars if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_governance_vars.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber

* Placebo, balance, etc

global checks wolof toucpeul serer bambara soninke diola others male urbrur2 age christian muslim *_lang

label var wolof "Wolof"
label var toucpeul "Toucouleur/Peul"
label var serer "Serer"
label var bambara "Bambara"
label var soninke "Soninke"
label var diola "Diola"
label var others "Other ethnicities"
label var male "Male"
label var urbrur2 "Rural"
label var age "Age of respondent"
label var christian "Christian"
label var muslim "Muslim"
label var wolof_lang "Wolof (language)"
label var toucpeul_lang "Toucouleur/Peul (language)"
label var serer_lang "Serer (language)"
label var mand_lang "Mandinka (language)"

estpost summ $checks if birthyear >= 1970 & birthyear <= 1997
esttab using "tables/summ_checks.tex", replace booktabs cells("count mean(fmt(3)) sd(fmt(3)) min max") label nomtitle noobs nonumber
